<?php 
require_once '../../config.php';
$css_arr = array(
	'css/orquesta/orquesta.css',
	'css/orquesta/integrantes.css'
);
$js_arr = array();
require_once PATH . 'layout/header.php';
require_once PATH . 'classes/ofj-orm/OrquestaCategoria.php';
require_once PATH . 'classes/ofj-orm/OrquestaSubCategoria.php';

$OrquestaCategoria = OrquestaCategoria::instance()->find(array(
	'order_by' => 'id ASC'
));
?>
<div class="clearfix">

    <!-- INTEGRANTES -->
    <?php 
    	require_once '../sidebar_menu.php';
    	Lang::setSource('integrantes'); 
    ?>
    
    <section id="musicians_secction">
    	<?php require_once '../menu.php';?>
    	
    	<ul id="musicians_categories">
    		<?php 
    		foreach ($OrquestaCategoria as $Categoria ) :
    			$nombre = (LANG == 'en') ? $Categoria->nombre_en : $Categoria->nombre; 
    		?>
    		<li class="clearfix">
    			<h3><?php echo $nombre;?></h3>
    				<img src="img/orquesta/integrantes/<?php echo $Categoria->id?>.jpg" width="300" height="130" alt="<?php echo $nombre;?>" title="<?php echo $nombre;?>" class="cat_img"  />
    			<div class="instrument_cont">
    				<?php
    					$OrquestaSubCategoria = OrquestaSubCategoria::instance()->find(array(
    						'where' => 'orquesta_categoria_id = :orquesta_categoria_id',
    						'arguments' => array(':orquesta_categoria_id' => $Categoria->id),
    						'order_by' => 'id ASC'
    					));
    					
    					foreach ($OrquestaSubCategoria as $SubCategoria) :
    						$sub_name =  (LANG == 'en') ? $SubCategoria->nombre_en : $SubCategoria->nombre;
    				?>
	    			<a href="<?php echo BASE ?>orquesta/instrumento/?id=<?php echo $SubCategoria->id; ?>" class="instrument_title"><?php echo $sub_name?></a> 
						<?php endforeach; ?>
					</div>
    		</li>
    		<?php endforeach; ?>
    	</ul> <!-- end of #musicians_categories -->
    	
    </section> <!-- End of #musicians_secction -->
    <!-- INTEGRANTES -->
    
</div><!-- end of .clearfix -->
<?php 
require_once PATH . 'layout/footer.php';
?>